<script type="text/javascript" src="/media/js/validate.js"></script>
<script type="text/javascript">
    $(document).ready(function() {
        
        $("#form").validate({
            rules:{
                name:'required'
            },
            messages:{
                name:'名称不能为空！'
            },
            invalidHandler: function(e, validator) {
                var errors = validator.numberOfInvalids();
                if (errors) {
                    var message = errors == 1
                        ? '您有<font color="green">1</font>处填写错误,请认真填写！'
                    : '您有 <font color="green">' + errors + ' </font>处填写错误,请认真填写！';
                    $("div.error #error-info").html(message);
                    $('div.success').hide();
                    $("div.error").show();
                } else {
                    $("div.error").hide();
                }
            }
        });
    });

</script>

<div id="page-layout"><div id="page-content">
        <div id="page-content-wrapper">
            <div class="inner-page-title">
                <h2>广告管理</h2>
            </div>
            <?php echo Message::get();?>
            <div class="response-msg error ui-corner-all" style="display:none;">
                <span>错误提示</span><span id="error-info"></span>
            </div>
              <div class="content-box content-box-header ui-corner-all"> 
          <div class="ui-state-default ui-corner-top ui-box-header"> <span class="ui-icon float-left ui-icon-signal"></span> 
           添加新的广告分类 </div>
          <div class="content-box-wrapper"> 
            <form action="" method="post" enctype="multipart/form-data" class="forms" name="form" id="form">
                    <div id="tabs-1">

                        <ul>

                            <li>
                                <label  class="desc"> 分类名称： <span class="req">*</span></label>
                                <div>
                                    <input type="text" tabindex="1" maxlength="255" value="<?php echo $data['name']?>" class="field text medium" name="name" />
                                </div>
                            </li>
                        </ul>
                    </div>
                    <ul>
                        <li class="buttons" style=" text-align: center;">
                            <button class="ui-state-default ui-corner-all ui-button" type="submit" id="submit_btn"> 编辑广告分类</button>
                        </li>
                    </ul>
                </form>
              
              
              
              
          </div>
        </div>
            <div class="clearfix"></div>

            <?php echo View::factory('admin/modules/modules_left')->render(); ?>
            <div class="clear"></div>			
        </div>
        <div class="clear"></div>
    </div>
